home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / xemacs.info-2.z / xemacs.info-2
Encoding:
GNU Info File  |  1998-05-21  |  48.1 KB  |  1,144 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo version
  2. 1.68 from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Mode Line,  Next: XEmacs under X,  Prev: Echo Area,  Up: Frame
  29.  
  30. The Mode Line
  31. =============
  32.  
  33.    Each text window's last line is a "mode line" which describes what is
  34. going on in that window.  When there is only one text window, the mode
  35. line appears right above the echo area.  The mode line is in inverse
  36. video if the terminal supports that, starts and ends with dashes, and
  37. contains text like `XEmacs: SOMETHING'.
  38.  
  39.    If a mode line has something else in place of `XEmacs: SOMETHING',
  40. the window above it is in a special subsystem such as Dired.  The mode
  41. line then indicates the status of the subsystem.
  42.  
  43.    Normally, the mode line has the following appearance:
  44.  
  45.      --CH-XEmacs: BUF      (MAJOR MINOR)----POS------
  46.  
  47. This gives information about the buffer being displayed in the window:
  48. the buffer's name, what major and minor modes are in use, whether the
  49. buffer's text has been changed, and how far down the buffer you are
  50. currently looking.
  51.  
  52.    CH contains two stars (`**') if the text in the buffer has been
  53. edited (the buffer is "modified"), or two dashes (`--') if the buffer
  54. has not been edited.  Exception: for a read-only buffer, it is `%%'.
  55.  
  56.    BUF is the name of the window's chosen "buffer".  The chosen buffer
  57. in the selected window (the window that the cursor is in) is also
  58. XEmacs's selected buffer, the buffer in which editing takes place.  When
  59. we speak of what some command does to "the buffer", we mean the
  60. currently selected buffer.  *Note Buffers::.
  61.  
  62.    POS tells you whether there is additional text above the top of the
  63. screen or below the bottom.  If your file is small and it is completely
  64. visible on the screen, POS is `All'.  Otherwise, POS is `Top' if you
  65. are looking at the beginning of the file, `Bot' if you are looking at
  66. the end of the file, or `NN%', where NN is the percentage of the file
  67. above the top of the screen.
  68.  
  69.    MAJOR is the name of the "major mode" in effect in the buffer.  At
  70. any time, each buffer is in one and only one major mode.  The available
  71. major modes include Fundamental mode (the least specialized), Text
  72. mode, Lisp mode, and C mode.  *Note Major Modes::, for details on how
  73. the modes differ and how you select one.
  74.  
  75.    MINOR is a list of some of the "minor modes" that are turned on in
  76. the window's chosen buffer.  For example, `Fill' means that Auto Fill
  77. mode is on.  `Abbrev' means that Word Abbrev mode is on.  `Ovwrt' means
  78. that Overwrite mode is on.  *Note Minor Modes::, for more information.
  79. `Narrow' means that the buffer being displayed has editing restricted
  80. to only a portion of its text.  This is not really a minor mode, but is
  81. like one.  *Note Narrowing::.  `Def' means that a keyboard macro is
  82. being defined.  *Note Keyboard Macros::.
  83.  
  84.    Some buffers display additional information after the minor modes.
  85. For example, Rmail buffers display the current message number and the
  86. total number of messages.  Compilation buffers and Shell mode display
  87. the status of the subprocess.
  88.  
  89.    If XEmacs is currently inside a recursive editing level, square
  90. brackets (`[...]') appear around the parentheses that surround the
  91. modes.  If XEmacs is in one recursive editing level within another,
  92. double square brackets appear, and so on.  Since information on
  93. recursive editing applies to XEmacs in general and not to any one
  94. buffer, the square brackets appear in every mode line on the screen or
  95. not in any of them.  *Note Recursive Edit::.
  96.  
  97.    XEmacs can optionally display the time and system load in all mode
  98. lines.  To enable this feature, type `M-x display-time'.  The
  99. information added to the mode line usually appears after the file name,
  100. before the mode names and their parentheses.  It looks like this:
  101.  
  102.      HH:MMpm L.LL [D]
  103.  
  104. (Some fields may be missing if your operating system cannot support
  105. them.)  HH and MM are the hour and minute, followed always by `am' or
  106. `pm'.  L.LL is the average number of running processes in the whole
  107. system recently.  D is an approximate index of the ratio of disk
  108. activity to CPU activity for all users.
  109.  
  110.    The word `Mail' appears after the load level if there is mail for
  111. you that you have not read yet.
  112.  
  113.    Customization note: the variable `mode-line-inverse-video' controls
  114. whether the mode line is displayed in inverse video (assuming the
  115. terminal supports it); `nil' means no inverse video.  The default is
  116. `t'.  For X frames, simply set the foreground and background colors
  117. appropriately.
  118.  
  119. 
  120. File: xemacs.info,  Node: XEmacs under X,  Prev: Mode Line,  Up: Frame
  121.  
  122. Using XEmacs Under the X Window System
  123. ======================================
  124.  
  125.    XEmacs can be used with the X Window System and a window manager like
  126. MWM or TWM.  In that case, the X window manager opens, closes, and
  127. resizes XEmacs frames.  You use the window manager's mouse gestures to
  128. perform the operations.  Consult your window manager guide or reference
  129. manual for information on manipulating X windows.
  130.  
  131.    When you are working under X, each X window (that is, each XEmacs
  132. frame) has a menu bar for mouse-controlled operations (*note Pull-down
  133. Menus::.).
  134.  
  135.    XEmacs under X is also a multi-frame XEmacs.  You can use the New
  136. Frame menu item from the File menu to create a new XEmacs frame in a
  137. new X window from the same process.  The different frames will share the
  138. same buffer list, but you can look at different buffers in the different
  139. frames.
  140.  
  141.    The function `find-file-other-frame' is just like `find-file', but
  142. creates a new frame to display the buffer in first.  This is normally
  143. bound to `C-x 5 C-f', and is what the Open File, New Frame menu item
  144. does.
  145.  
  146.    The function `switch-to-buffer-other-frame' is just like
  147. `switch-to-buffer', but creates a new frame to display the buffer in
  148. first.  This is normally bound to `C-x 5 b'.
  149.  
  150.    You can specify a different default frame size other than the one
  151. provided.  Use the variable `default-frame-alist', which is an alist of
  152. default values for frame creation other than the first one.  These may
  153. be set in your init file, like this:
  154.  
  155.        (setq default-frame-alist '((width . 80) (height . 55)))
  156.  
  157.    For values specific to the first XEmacs frame, you must use X
  158. resources.  The variable `x-frame-defaults' takes an alist of default
  159. frame creation parameters for X window frames.  These override what is
  160. specified in `~/.Xdefaults' but are overridden by the arguments to the
  161. particular call to `x-create-frame'.
  162.  
  163.    When you create a new frame, the variable `create-frame-hook' is
  164. called with one argument, the frame just created.
  165.  
  166.    If you want to close one or more of the X windows you created using
  167. New Frame, use the Delete Frame menu item from the File menu.
  168.  
  169.    If you are working with multiple frames, some special information
  170. applies:
  171.    * Two variables, `frame-title-format' and `frame-icon-title-format'
  172.      determine the title of the frame and the title of the icon that
  173.      results if you shrink the frame.
  174.  
  175.    * The variables `auto-lower-frame' and `auto-raise-frame' position a
  176.      frame. If true, `auto-lower-frame' lowers a frame to the bottom
  177.      when it is no longer selected. If true, `auto-raise-frame' raises
  178.      a frame to the top when it is selected. Under X, most
  179.      ICCCM-compliant window managers will have options to do this for
  180.      you, but these variables are provided in case you are using a
  181.      broken window manager.
  182.  
  183.    * There is a new frame/modeline format directive, %S, which expands
  184.      to the name of the current frame (a frame's name is distinct from
  185.      its title; the name is used for resource lookup, among other
  186.      things, and the title is simply what appears above the window.)
  187.  
  188. 
  189. File: xemacs.info,  Node: Keystrokes,  Next: Pull-down Menus,  Prev: Frame,  Up: Top
  190.  
  191. Keystrokes, Key Sequences, and Key Bindings
  192. *******************************************
  193.  
  194. * Menu:
  195.  
  196. * Intro to Keystrokes::      Keystrokes as building blocks of key sequences.
  197. * Representing Keystrokes::  Using lists of modifiers and keysyms to
  198.                              represent keystrokes.
  199. * Key Sequences::            Combine key strokes into key sequences you can
  200.                              bind to commands.
  201. * String Key Sequences::     Available for upward compatibility.
  202. * Meta Key::                 Using <ESC> to represent <Meta>
  203. * Super and Hyper Keys::     Adding modifier keys on certain keyboards.
  204. * Character Representation:: How characters appear in Emacs buffers.
  205. * Commands::                 How commands are bound to key sequences.
  206.  
  207. 
  208. File: xemacs.info,  Node: Intro to Keystrokes,  Next: Representing Keystrokes,  Prev: Keystrokes,  Up: Keystrokes
  209.  
  210. Keystrokes as Building Blocks of Key Sequences
  211. ==============================================
  212.  
  213.    Earlier versions of Emacs used only the ASCII character set, which
  214. defines 128 different character codes.  Some of these codes are
  215. assigned graphic symbols like `a' and `='; the rest are control
  216. characters, such as `Control-a' (also called `C-a').  `C-a' means you
  217. hold down the <CTRL> key and then press `a'.
  218.  
  219.    Keybindings in XEmacs are not restricted to the set of keystrokes
  220. that can be represented in ASCII.  XEmacs can tell the difference
  221. between, for example, `Control-h', `Control-Shift-h', and `Backspace'.
  222.  
  223.    A keystroke is like a piano chord: you get it by simultaneously
  224. striking several keys.  To be more precise, a keystroke consists of a
  225. possibly empty set of modifiers followed by a single "keysym".  The set
  226. of modifiers is small; it consists of `Control', `Meta', `Super',
  227. `Hyper', and `Shift'.
  228.  
  229.    The rest of the keys on your keyboard, along with the mouse buttons,
  230. make up the set of keysyms.  A keysym is usually what is printed on the
  231. keys on your keyboard.  Here is a table of some of the symbolic names
  232. for keysyms:
  233. `a,b,c...'
  234.      alphabetic keys
  235.  
  236. `f1,f2...'
  237.      function keys
  238.  
  239. `button1'
  240.      left mouse button
  241.  
  242. `button2'
  243.      middle mouse button
  244.  
  245. `button3'
  246.      right mouse button
  247.  
  248. `button1up'
  249.      upstroke on the left mouse button
  250.  
  251. `button2up'
  252.      upstroke on the middle mouse button
  253.  
  254. `button3up'
  255.      upstroke on the right mouse button
  256.  
  257. `return'
  258.      Return key
  259.  
  260.    Use the variable `keyboard-translate-table' only if you are on a
  261. dumb tty, as it cannot handle input that cannot be represented as ASCII.
  262. The value of this variable is a string used as a translate table for
  263. keyboard input or `nil'.  Each character is looked up in this string
  264. and the contents used instead.  If the string is of length `n',
  265. character codes `N' and up are untranslated.  If you are running Emacs
  266. under X, you should do the translations with the `xmodmap' program
  267. instead.
  268.  
  269. 
  270. File: xemacs.info,  Node: Representing Keystrokes,  Next: Key Sequences,  Prev: Intro to Keystrokes,  Up: Keystrokes
  271.  
  272. Representing Keystrokes
  273. -----------------------
  274.  
  275.    XEmacs represents keystrokes as lists. Each list consists of an
  276. arbitrary combination of modifiers followed by a single keysym at the
  277. end of the list.  If the keysym corresponds to an ASCII character, you
  278. can use its character code.  (A keystroke may also be represented by an
  279. event object, as returned by the `read-key-sequence' function;
  280. non-programmers need not worry about this.)
  281.  
  282.    The following table gives some examples of how to list
  283. representations for keystrokes.  Each list consists of sets of
  284. modifiers followed by keysyms:
  285.  
  286. `(control a)'
  287.      Pressing <CTRL> and `a' simultaneously.
  288.  
  289. `(control ?a)'
  290.      Another way of writing the keystroke `C-a'.
  291.  
  292. `(control 65)'
  293.      Yet another way of writing the keystroke `C-a'.
  294.  
  295. `(break)'
  296.      Pressing the <BREAK> key.
  297.  
  298. `(control meta button2up)'
  299.      Release the middle mouse button, while pressing <CTRL> and <META>.
  300.  Note: As you define keystrokes, you can use the `shift' key only as a
  301. modifier with characters that do not have a second keysym on the same
  302. key, such as `backspace' and `tab'.  It is an error to define a
  303. keystroke using the <shift> modifier with keysyms such as `a' and `='.
  304. The correct forms are `A' and `+'.
  305.  
  306. 
  307. File: xemacs.info,  Node: Key Sequences,  Next: String Key Sequences,  Prev: Representing Keystrokes,  Up: Keystrokes
  308.  
  309. Representing Key Sequences
  310. --------------------------
  311.  
  312.    A "complete key sequence" is a sequence of keystrokes that Emacs
  313. understands as a unit.  Key sequences are significant because you can
  314. bind them to commands.  Note that not all sequences of keystrokes are
  315. possible key sequences.  In particular, the initial keystrokes in a key
  316. sequence must make up a "prefix key sequence".
  317.  
  318.    Emacs represents a key sequence as a vector of keystrokes.  Thus, the
  319. schematic representation of a complete key sequence is as follows:
  320.  
  321.        [(modifier .. modifer keysym) ... (modifier .. modifier keysym)]
  322.  
  323.    Here are some examples of complete key sequences:
  324.  
  325. `[(control c) (control a)]'
  326.      Typing `C-c' followed by `C-a'
  327.  
  328. `[(control c) (control 65)]'
  329.      Typing `C-c' followed by `C-a'. (Using the ASCII code for the
  330.      character `a')
  331.  
  332. `[(control c) (break)]'
  333.      Typing `C-c' followed by the `break' character.
  334.  
  335.    A "prefix key sequence" is the beginning of a series of longer
  336. sequences that are valid key sequences; adding any single keystroke to
  337. the end of a prefix results in a valid key sequence.  For example,
  338. `control-x' is standardly defined as a prefix.  Thus there is a
  339. two-character key sequence starting with `C-x' for each valid
  340. keystroke, giving numerous possibilities.  Here are some samples:
  341.  
  342.    * `[(control x) (c)]'
  343.  
  344.    * `[(control x) (control c)]'
  345.  
  346.    Adding one character to a prefix key does not have to form a complete
  347. key.  It could make another, longer prefix.  For example, `[(control x)
  348. (\4)]' is itself a prefix that leads to any number of different
  349. three-character keys, including `[(control x) (\4) (f)]', `[(control x)
  350. (\4) (b)]' and so on.  It would be possible to define one of those
  351. three-character sequences as a prefix, creating a series of
  352. four-character keys, but we did not define any of them this way.
  353.  
  354.    By contrast, the two-character sequence `[(control f) (control k)]'
  355. is not a key, because the `(control f)' is a complete key sequence in
  356. itself.  You cannot give `[(control f (control k)]' an independent
  357. meaning as a command while `(control f)' is a complete sequence,
  358. because Emacs would understand <C-f C-k> as two commands.
  359.  
  360.    The predefined prefix key sequences in Emacs are `(control c)',
  361. `(control x)', `(control h)', `[(control x) (\4)]', and `escape'.  You
  362. can customize Emacs and could make new prefix keys or eliminate the
  363. default key sequences.  *Note Key Bindings::.  For example, if you
  364. redefine `(control f)' as a prefix, `[(control f) (control k)]'
  365. automatically becomes a valid key sequence (complete, unless you define
  366. it as a prefix as well).  Conversely, if you remove the prefix
  367. definition of `[(control x) (\4)]', `[(control x) (\4) (f)]' (or
  368. `[(control x) (\4) ANYTHING]') is no longer a valid key sequence.
  369.  
  370.    Note that the above paragraphs uses \4 instead of simply 4, because
  371. \4 is the symbol whose name is "4", and plain 4 is the integer 4, which
  372. would have been interpreted as the ASCII value.  Another way of
  373. representing the symbol whose name is "4" is to write ?4, which would be
  374. interpreted as the number 52, which is the ASCII code for the character
  375. "4".  We could therefore actually have written 52 directly, but that is
  376. far less clear.
  377.  
  378. 
  379. File: xemacs.info,  Node: String Key Sequences,  Next: Meta Key,  Prev: Key Sequences,  Up: Keystrokes
  380.  
  381. String Key Sequences
  382. --------------------
  383.  
  384.    For backward compatibility, you may also represent a key sequence
  385. using strings.  For example, we have the following equivalent
  386. representations:
  387.  
  388. `"\C-c\C-c"'
  389.      `[(control c) (control c)]'
  390.  
  391. `"\e\C-c"'
  392.      `[(meta control c)]'
  393.  
  394. 
  395. File: xemacs.info,  Node: Meta Key,  Next: Super and Hyper Keys,  Prev: String Key Sequences,  Up: Keystrokes
  396.  
  397. Assignment of the <META> Key
  398. ----------------------------
  399.  
  400.    Not all terminals have the complete set of modifiers.  Terminals
  401. that have a <Meta> key allow you to type Meta characters by just
  402. holding that key down.  To type `Meta-a', hold down <META> and press
  403. `a'.  On those terminals, the <META> key works like the <SHIFT> key.
  404. Such a key is not always labeled <META>, however, as this function is
  405. often a special option for a key with some other primary purpose.
  406.  
  407.    If there is no <META> key, you can still type Meta characters using
  408. two-character sequences starting with <ESC>.  To enter `M-a', you could
  409. type `<ESC> a'.  To enter `C-M-a', you would type `ESC C-a'.  <ESC> is
  410. allowed on terminals with Meta keys, too, in case you have formed a
  411. habit of using it.
  412.  
  413.    If you are running under X and do not have a <META> key, it is
  414. possible to reconfigure some other key to be a <META> key.  *Note Super
  415. and Hyper Keys::.
  416.  
  417.    Emacs believes the terminal has a <META> key if the variable
  418. `meta-flag' is non-`nil'.  Normally this is set automatically according
  419. to the termcap entry for your terminal type.  However, sometimes the
  420. termcap entry is wrong, and then it is useful to set this variable
  421. yourself.  *Note Variables::, for how to do this.
  422.  
  423.    Note: If you are running under the X window system, the setting of
  424. the `meta-flag' variable is irrelevant.
  425.  
  426. 
  427. File: xemacs.info,  Node: Super and Hyper Keys,  Next: Character Representation,  Prev: Meta Key,  Up: Keystrokes
  428.  
  429. Assignment of the <SUPER> and <HYPER> Keys
  430. ------------------------------------------
  431.  
  432.    Most keyboards do not, by default, have <SUPER> or <HYPER> modifier
  433. keys.  Under X, you can simulate the <SUPER> or <HYPER> key if you want
  434. to bind keys to sequences using `super' and `hyper'.  You can use the
  435. `xmodmap' program to do this.
  436.  
  437.    For example, to turn your <CAPS-LOCK> key into a <SUPER> key, do the
  438. following:
  439.  
  440.    Create a file called `~/.xmodmap'.  In this file, place the lines
  441.  
  442.          remove Lock = Caps_Lock
  443.          keysym Caps_Lock = Super_L
  444.          add Mod2 = Super_L
  445.  
  446.    The first line says that the key that is currently called `Caps_Lock'
  447. should no longer behave as a "lock" key.  The second line says that
  448. this should now be called `Super_L' instead.  The third line says that
  449. the key called `Super_L' should be a modifier key, which produces the
  450. `Mod2' modifier.
  451.  
  452.    To create a <META> or <HYPER> key instead of a <SUPER> key, replace
  453. the word `Super' above with `Meta' or `Hyper'.
  454.  
  455.    Just after you start up X, execute the command `xmodmap /.xmodmap'.
  456. You can add this command to the appropriate initialization file to have
  457. the command executed automatically.
  458.  
  459.    If you have problems, see the documentation for the `xmodmap'
  460. program.  The X keyboard model is quite complicated, and explaining it
  461. is beyond the scope of this manual.  However, we reprint the following
  462. description from the X Protocol document for your convenience:
  463.  
  464.    A list of keysyms is associated with each keycode. If that list
  465. (ignoring trailing `NoSymbol' entries) is a single keysym `K', then the
  466. list is treated as if it were the list ```K NoSymbol K NoSymbol'''. If
  467. the list (ignoring trailing `NoSymbol' entries) is a pair of keysyms
  468. `K1 K2', then the list is treated as if it were the list ```K1 K2 K1
  469. K2'''. If the list (ignoring trailing `NoSymbol' entries) is a triple
  470. of keysyms `K1 K2 K3', then the list is treated as if it were the list
  471. ```K1 K2 K3 NoSymbol'''.
  472.  
  473.    The first four elements of the list are split into two groups of
  474. keysyms. Group 1 contains the first and second keysyms; Group 2 contains
  475. third and fourth keysyms. Within each group, if the second element of
  476. the group is NoSymbol, then the group should be treated as if the second
  477. element were the same as the first element, except when the first
  478. element is an alphabetic keysym `K' for which both lowercase and
  479. uppercase forms are defined. In that case, the group should be treated
  480. as if the first element were the lowercase form of `K' and the second
  481. element were the uppercase form of `K'.
  482.  
  483.    The standard rules for obtaining a keysym from a KeyPress event make
  484. use of only the Group 1 and Group 2 keysyms; no interpretation of other
  485. keysyms in the list is given here. (That is, the last four keysyms are
  486. unused.)
  487.  
  488.    Which group to use is determined by modifier state. Switching between
  489. groups is controlled by the keysym named `Mode_switch'. Attach that
  490. keysym to some keycode and attach that keycode to any one of the
  491. modifiers Mod1 through Mod5. This modifier is called the "group
  492. modifier". For any keycode, Group 1 is used when the group modifier is
  493. off, and Group 2 is used when the group modifier is on.
  494.  
  495.    Within a group, which keysym to use is also determined by modifier
  496. state. The first keysym is used when the `Shift' and `Lock' modifiers
  497. are off. The second keysym is used when the `Shift' modifier is on, or
  498. when the `Lock' modifier is on and the second keysym is uppercase
  499. alphabetic, or when the `Lock' modifier is on and is interpreted as
  500. `ShiftLock'. Otherwise, when the `Lock' modifier is on and is
  501. interpreted as `CapsLock', the state of the `Shift' modifier is applied
  502. first to select a keysym, but if that keysym is lower-case alphabetic,
  503. then the corresponding upper-case keysym is used instead.
  504.  
  505.    In addition to the above information on keysyms, we also provide the
  506. following description of modifier mapping from the InterClient
  507. Communications Conventions Manual:
  508.  
  509.    X11 supports 8 modifier bits, of which 3 are pre-assigned to
  510. `Shift', `Lock', and `Control'. Each modifier bit is controlled by the
  511. state of a set of keys, and these sets are specified in a table
  512. accessed by `GetModifierMapping()' and `SetModifierMapping()'.
  513.  
  514.    A client needing to use one of the pre-assigned modifiers should
  515. assume that the modifier table has been set up correctly to control
  516. these modifiers. The `Lock' modifier should be interpreted as `Caps
  517. Lock' or `Shift Lock' according to whether the keycodes in its
  518. controlling set include `XK_Caps_Lock' or `XK_Shift_Lock'.
  519.  
  520.    Clients should determine the meaning of a modifier bit from the
  521. keysyms being used to control it.
  522.  
  523.    A client needing to use an extra modifier, for example `Meta',
  524. should:
  525.  
  526.   1. Scan the existing modifier mappings.
  527.  
  528.        1. If it finds a modifier that contains a keycode whose set of
  529.           keysyms includes `XK_Meta_L' or `XK_Meta_R', it should use
  530.           that modifier bit.
  531.  
  532.        2. If there is no existing modifier controlled by `XK_Meta_L' or
  533.           `XK_Meta_R', it should select an unused modifier bit (one with
  534.           an empty controlling set) and:
  535.  
  536.   2. If there is a keycode with `XL_Meta_L' in its set of keysyms, add
  537.      that keycode to the set for the chosen modifier, and then:
  538.  
  539.        1. If there is a keycode with `XL_Meta_R' in its set of keysyms,
  540.           add that keycode to the set for the chosen modifier, and then:
  541.  
  542.        2. If the controlling set is still empty, interact with the user
  543.           to select one or more keys to be `Meta'.
  544.  
  545.   3. If there are no unused modifier bits, ask the user to take
  546.      corrective action.
  547.  
  548.    This means that the `Mod1' modifier does not necessarily mean
  549. `Meta', although some applications (such as twm and emacs 18) assume
  550. that. Any of the five unassigned modifier bits could mean `Meta'; what
  551. matters is that a modifier bit is generated by a keycode which is bound
  552. to the keysym `Meta_L' or `Meta_R'.
  553.  
  554.    Therefore, if you want to make a <META> key, the right way is to
  555. make the keycode in question generate both a `Meta' keysym and some
  556. previously-unassigned modifier bit.
  557.  
  558. 
  559. File: xemacs.info,  Node: Character Representation,  Next: Commands,  Prev: Super and Hyper Keys,  Up: Keystrokes
  560.  
  561. Representation of Characters
  562. ============================
  563.  
  564.    This section briefly discusses how characters are represented in
  565. Emacs buffers.  *Note Key Sequences:: for information on representing
  566. key sequences to create key bindings.
  567.  
  568.    ASCII graphic characters in Emacs buffers are displayed with their
  569. graphics.  <LFD> is the same as a newline character; it is displayed by
  570. starting a new line.  <TAB> is displayed by moving to the next tab stop
  571. column (usually every 8 spaces).  Other control characters are
  572. displayed as a caret (`^') followed by the non-control version of the
  573. character; thus, `C-a' is displayed as `^A'.  Non-ASCII characters 128
  574. and up are displayed with octal escape sequences; thus, character code
  575. 243 (octal), also called `M-#' when used as an input character, is
  576. displayed as `\243'.
  577.  
  578.    The variable `ctl-arrow' may be used to alter this behavior.  *Note
  579. Display Vars::.
  580.  
  581. 
  582. File: xemacs.info,  Node: Commands,  Prev: Character Representation,  Up: Keystrokes
  583.  
  584. Keys and Commands
  585. =================
  586.  
  587.    This manual is full of passages that tell you what particular keys
  588. do.  But Emacs does not assign meanings to keys directly.  Instead,
  589. Emacs assigns meanings to "functions", and then gives keys their
  590. meanings by "binding" them to functions.
  591.  
  592.    A function is a Lisp object that can be executed as a program.
  593. Usually it is a Lisp symbol that has been given a function definition;
  594. every symbol has a name, usually made of a few English words separated
  595. by dashes, such as `next-line' or `forward-word'.  It also has a
  596. "definition", which is a Lisp program.  Only some functions can be the
  597. bindings of keys; these are functions whose definitions use
  598. `interactive' to specify how to call them interactively.  Such
  599. functions are called "commands", and their names are "command names".
  600. More information on this subject will appear in the XEmacs Lisp
  601. Reference Manual.
  602.  
  603.    The bindings between keys and functions are recorded in various
  604. tables called "keymaps".  *Note Key Bindings:: for more information on
  605. key sequences you can bind commands to.  *Note Keymaps:: for
  606. information on creating keymaps.
  607.  
  608.    When we say  "`C-n' moves down vertically one line" we are glossing
  609. over a distinction that is irrelevant in ordinary use but is vital in
  610. understanding how to customize Emacs.  The function `next-line' is
  611. programmed to move down vertically.  `C-n' has this effect because it
  612. is bound to that function.  If you rebind `C-n' to the function
  613. `forward-word' then `C-n' will move forward by words instead.
  614. Rebinding keys is a common method of customization.
  615.  
  616.    The rest of this manual usually ignores this subtlety to keep things
  617. simple.  To give the customizer the information needed, we often state
  618. the name of the command that really does the work in parentheses after
  619. mentioning the key that runs it.  For example, we will say that "The
  620. command `C-n' (`next-line') moves point vertically down," meaning that
  621. `next-line' is a command that moves vertically down and `C-n' is a key
  622. that is standardly bound to it.
  623.  
  624.    While we are on the subject of information for customization only,
  625. it's a good time to tell you about "variables".  Often the description
  626. of a command will say, "To change this, set the variable `mumble-foo'."
  627. A variable is a name used to remember a value.  Most of the variables
  628. documented in this manual exist just to facilitate customization: some
  629. command or other part of Emacs uses the variable and behaves
  630. differently depending on its setting.  Until you are interested in
  631. customizing, you can ignore the information about variables.  When you
  632. are ready to be interested, read the basic information on variables, and
  633. then the information on individual variables will make sense.  *Note
  634. Variables::.
  635.  
  636. 
  637. File: xemacs.info,  Node: Pull-down Menus,  Next: Entering Emacs,  Prev: Keystrokes,  Up: Top
  638.  
  639. XEmacs Pull-down Menus
  640. ======================
  641.  
  642.    If you are running XEmacs under X, a menu bar on top of the Emacs
  643. frame provides access to pull-down menus of file, edit, and
  644. help-related commands. The menus provide convenient shortcuts and an
  645. easy interface for novice users.  They do not provide additions to the
  646. functionality available via key commands; you can still invoke commands
  647. from the keyboard as in previous versions of Emacs.
  648.  
  649. File
  650.      Perform file and buffer-related operations, such as opening and
  651.      closing files, saving and printing buffers, as well as exiting
  652.      Emacs.
  653.  
  654. Edit
  655.      Perform standard editing operations, such as cutting, copying,
  656.      pasting, and killing selected text.
  657.  
  658. Apps
  659.      Access to sub-applications implemented within XEmacs, such as the
  660.      mail reader, the World Wide Web browser, the spell-checker, and
  661.      the calendar program.
  662.  
  663. Options
  664.      Control various options regarding the way XEmacs works, such as
  665.      controlling which elements of the frame are visible, selecting the
  666.      fonts to be used for text, specifying whether searches are
  667.      case-sensitive, etc.
  668.  
  669. Buffers
  670.      Present a menu of buffers for selection as well as the option to
  671.      display a buffer list.
  672.  
  673. Tools
  674.      Perform various actions designed to automate software development
  675.      and similar technical work, such as searching through many files,
  676.      compiling a program, and comparing or merging two or three files.
  677.  
  678. Help
  679.      Access to Emacs Info.
  680.  
  681.    There are two ways of selecting an item from a pull-down menu:
  682.  
  683.    * Select an item in the menu bar by moving the cursor over it and
  684.      click the left mouse-button.  Then move the cursor over the menu
  685.      item you want to choose and click left again.
  686.  
  687.    * Select an item in the menu bar by moving the cursor over it and
  688.      click and hold the left mouse-button.  With the mouse-button
  689.      depressed, move the cursor over the menu item you want, then
  690.      release it to make your selection.
  691.  
  692.    If a command in the pull-down menu is not applicable in a given
  693. situation, the command is disabled and its name appears faded.  You
  694. cannot invoke items that are faded.  For example, many commands on the
  695. Edit menu appear faded until you select text on which they are to
  696. operate; after you select a block of text, edit commands are enabled.
  697. *Note Mouse Selection:: for information on using the mouse to select
  698. text.  *Note Using X Selections:: for related information.
  699.  
  700.    There are also `M-x' equivalents for each menu item.  To find the
  701. equivalent for any left-button menu item, do the following:
  702.  
  703.   1. Type `C-h k' to get the `Describe Key' prompt.
  704.  
  705.   2. Select the menu item and click.
  706.  
  707.    Emacs displays the function associated with the menu item in a
  708. separate window, usually together with some documentation.
  709.  
  710. * Menu:
  711.  
  712. * File Menu::           Items on the File menu.
  713. * Edit Menu::           Items on the Edit menu.
  714. * Apps Menu::        Items on the Apps menu.
  715. * Options Menu::        Items on the Options menu.
  716. * Buffers Menu::        Information about the Buffers menu.
  717. * Tools Menu::        Items on the Tools menu.
  718. * Help Menu::           Items on the Help menu.
  719. * Menu Customization::  Adding and removing menu items and related
  720.                         operations.
  721.  
  722. 
  723. File: xemacs.info,  Node: File Menu,  Next: Edit Menu,  Up: Pull-down Menus
  724.  
  725. The File Menu
  726. -------------
  727.  
  728.    The File menu bar item contains the items New Frame, Open File...,
  729. Save Buffer, Save Buffer As..., Revert Buffer, Print Buffer, Delete
  730. Frame, Kill Buffer and Exit Emacs on the pull-down menu.  If you select
  731. a menu item, Emacs executes the equivalent command.
  732.  
  733. Open File, New Frame...
  734.      Prompts you for a filename and loads that file into a new buffer
  735.      in a new Emacs frame, that is, a new X window running under the
  736.      same Emacs process.  You can remove the frame using the Delete
  737.      Frame menu item.  When you remove the last frame, you exit Emacs
  738.      and are prompted for confirmation.
  739.  
  740. Open File...
  741.      Prompts you for a filename and loads that file into a new buffer.
  742.      Open File... is equivalent to the Emacs command `find-file' (`C-x
  743.      C-f').
  744.  
  745. Insert File...
  746.      Prompts you for a filename and inserts the contents of that file
  747.      into the current buffer.  The file associated with the current
  748.      buffer is not changed by this command.  This is equivalent to the
  749.      Emacs command `insert-file' (`C-x i').
  750.  
  751. Save Buffer
  752.      Writes and saves the current Emacs buffer as the latest version of
  753.      the current visited file.  Save Buffer is equivalent to the Emacs
  754.      command `save-buffer' (`C-x C-s').
  755.  
  756. Save Buffer As...
  757.      Writes and saves the current Emacs buffer to the filename you
  758.      specify.  Save Buffer As... is equivalent to the Emacs command
  759.      `write-file' (`C-x C-w').
  760.  
  761. Revert Buffer
  762.      Restores the last saved version of the file to the current buffer.
  763.      When you edit a buffer containing a text file, you must save the
  764.      buffer before your changes become effective.  Use Revert Buffer if
  765.      you do not want to keep the changes you have made in the buffer.
  766.      Revert Buffer is equivalent to the Emacs command `revert-file'
  767.      (`M-x revert-buffer').
  768.  
  769. Kill Buffer
  770.      Kills the current buffer, prompting you first if there are unsaved
  771.      changes.  This is roughly equivalent to the Emacs command
  772.      `kill-buffer' (`C-x k'), except that `kill-buffer' prompts for the
  773.      name of a buffer to kill.
  774.  
  775. Print Buffer
  776.      Prints a hardcopy of the current buffer.  Equivalent to the Emacs
  777.      command `print-buffer' (`M-x print-buffer').
  778.  
  779. New Frame
  780.      Creates a new Emacs frame displaying the `*scratch*' buffer.  This
  781.      is like the Open File, New Frame... menu item, except that it does
  782.      not prompt for or load a file.
  783.  
  784. Delete Frame
  785.      Allows you to close all but one of the frames created by New Frame.
  786.      If you created several Emacs frames belonging to the same Emacs
  787.      process, you can close all but one of them.  When you attempt to
  788.      close the last frame, Emacs informs you that you are attempting to
  789.      delete the last frame.  You have to choose Exit Emacs for that.
  790.  
  791. Split Frame
  792.      Divides the current window on the current frame into two
  793.      equal-sized windows, both displaying the same buffer.  Equivalent
  794.      to the Emacs command `split-window-vertically' (`C-x 2').
  795.  
  796. Un-split (Keep This)
  797.      If the frame is divided into multiple windows, this removes all
  798.      windows other than the selected one.  Equivalent to the Emacs
  799.      command `delete-other-windows' (`C-x 1').
  800.  
  801. Un-split (Keep Others)
  802.      If the frame is divided into multiple windows, this removes the
  803.      selected window from the frame, giving the space back to one of the
  804.      other windows.  Equivalent to the Emacs command `delete-window'
  805.      (`C-x 0').
  806.  
  807. Exit Emacs
  808.      Shuts down (kills) the Emacs process.  Equivalent to the Emacs
  809.      command `save-buffers-kill-emacs' (`C-x C-c').  Before killing the
  810.      Emacs process, the system asks which unsaved buffers to save by
  811.      going through the list of all buffers in that Emacs process.
  812.  
  813. 
  814. File: xemacs.info,  Node: Edit Menu,  Next: Apps Menu,  Prev: File Menu,  Up: Pull-down Menus
  815.  
  816. The Edit Menu
  817. -------------
  818.  
  819.    The Edit pull-down menu contains the Undo, Cut, Copy, Paste, and
  820. Clear menu items.  When you select a menu item, Emacs executes the
  821. equivalent command.  Most commands on the Edit menu work on a block of
  822. text, the X selection.  They appear faded until you select a block of
  823. text (activate a region) with the mouse.  *Note Using X Selections::,
  824. *note Killing::., and *note Yanking::. for more information.
  825.  
  826. Undo
  827.      Undoes the previous command.  Undo is equivalent to the Emacs
  828.      command `undo' (`C-x u').
  829.  
  830. Cut
  831.      Removes the selected text block from the current buffer, makes it
  832.      the X clipboard selection, and places it in the kill ring.  Before
  833.      executing this command, you have to select a region using Emacs
  834.      region selection commands or with the mouse.
  835.  
  836. Copy
  837.      Makes a selected text block the X clipboard selection, and places
  838.      it in the kill ring.  You can select text using one of the Emacs
  839.      region selection commands or by selecting a text region with the
  840.      mouse.
  841.  
  842. Paste
  843.      Inserts the current value of the X clipboard selection in the
  844.      current buffer.  Note that this is not necessarily the same as the
  845.      Emacs `yank' command, because the Emacs kill ring and the X
  846.      clipboard selection are not the same thing.  You can paste in text
  847.      you have placed in the clipboard using Copy or Cut.  You can also
  848.      use Paste to insert text that was pasted into the clipboard from
  849.      other applications.
  850.  
  851. Clear
  852.      Removes the selected text block from the current buffer but does
  853.      not place it in the kill ring or the X clipboard selection.
  854.  
  855. Start Macro Recording
  856.      After selecting this, Emacs will remember every keystroke you type
  857.      until End Macro Recording is selected.  This is the same as the
  858.      Emacs command `start-kbd-macro' (`C-x (').
  859.  
  860. End Macro Recording
  861.      Selecting this tells emacs to stop remembering your keystrokes.
  862.      This is the same as the Emacs command `end-kbd-macro' (`C-x )').
  863.  
  864. Execute Last Macro
  865.      Selecting this item will cause emacs to re-interpret all of the
  866.      keystrokes which were saved between selections of the Start Macro
  867.      Recording and End Macro Recording menu items.  This is the same as
  868.      the Emacs command `call-last-kbd-macro' (`C-x e').
  869.  
  870. 
  871. File: xemacs.info,  Node: Apps Menu,  Next: Options Menu,  Prev: Edit Menu,  Up: Pull-down Menus
  872.  
  873. The Apps Menu
  874. -------------
  875.  
  876.    The Apps pull-down menu contains the Read Mail (VM)..., Read Mail
  877. (MH)..., Send Mail..., Usenet News, Browse the Web, Gopher, Spell-Check
  878. Buffer and Emulate VI menu items, and the Calendar and Games sub-menus.
  879. When you select a menu item, Emacs executes the equivalent command.
  880. For some of the menu items, there are sub-menus which you will need to
  881. select.
  882.  
  883. 
  884. File: xemacs.info,  Node: Options Menu,  Next: Buffers Menu,  Prev: Apps Menu,  Up: Pull-down Menus
  885.  
  886. The Options Menu
  887. ----------------
  888.  
  889.    The Options pull-down menu contains the Read Only, Case Sensitive
  890. Search, Overstrike, Auto Delete Selection, Teach Extended Commands,
  891. Syntax Highlighting, Paren Highlighting, Font, Size, Weight, Buffers
  892. Menu Length..., Buffers Sub-Menus and Save Options menu items.  When
  893. you select a menu item, Emacs executes the equivalent command.  For
  894. some of the menu items, there are sub-menus which you will need to
  895. select.
  896.  
  897. Read Only
  898.      Selecting this item will cause the buffer to visit the file in a
  899.      read-only mode. Changes to the file will not be allowed. This is
  900.      equivalent to the Emacs command `toggle-read-only' (`C-x C-q').
  901.  
  902. Case Sensitive Search
  903.      Selecting this item will cause searches to be case-sensitive. If
  904.      its not selected then searches will ignore case. This option is
  905.      local to the buffer.
  906.  
  907. Overstrike
  908.      After selecting this item, when you type letters they will replace
  909.      existing text on a one-to-one basis, rather than pushing it to the
  910.      right. At the end of a line, such characters extend the line.
  911.      Before a tab, such characters insert until the tab is filled in.
  912.      This is the same as Emacs command `quoted-insert' (`C-q').
  913.  
  914. Auto Delete Selection
  915.      Selecting this item will cause automatic deletion of the selected
  916.      region. The typed text will replace the selection if the selection
  917.      is active (i.e. if its highlighted). If the option is not selected
  918.      then the typed text is just inserted at the point.
  919.  
  920. Teach Extended Commands
  921.      After you  select this item, any time you execute a command with
  922.      `M-x'which has a shorter keybinding, you will be shown the
  923.      alternate binding before the command executes.
  924.  
  925. Syntax Highlighting
  926.      You can customize your `.emacs' file to include the font-lock mode
  927.      so that when you select this item, the comments will be displayed
  928.      in one face, strings in another, reserved words in another, and so
  929.      on. When Fonts is selected, different parts of the program will
  930.      appear in different Fonts. When Colors is selected, then the
  931.      program will be displayed in different colors. Selecting None
  932.      causes the program to appear in just one Font and Color. Selecting
  933.      Less resets the Fonts and Colors to a fast, minimal set of
  934.      decorations. Selecting More resets the Fonts and Colors to a larger
  935.      set of decorations. For example, if Less is selected (which is the
  936.      default setting) then you might have all comments in green color.
  937.      Whereas, if More is selected then a function name in the comments
  938.      themselves might appear in a different Color or Font.
  939.  
  940. Paren Highlighting
  941.      After selecting Blink from this item, if you place the cursor on a
  942.      parenthesis, the matching parenthesis will blink. If you select
  943.      Highlight and place the cursor on a parenthesis, the whole
  944.      expression of the parenthesis under the cursor will be highlighted.
  945.      Selecting None will turn off the options (regarding Paren
  946.      Highlighting) which you had selected earlier.
  947.  
  948. Font
  949.      You can select any Font for your program by choosing from one of
  950.      the available Fonts.
  951.  
  952. Size
  953.      You can select any size ranging from 2 to 24 by selecting the
  954.      appropriate option.
  955.  
  956. Weight
  957.      You can choose either Bold or Medium for the weight.
  958.  
  959. Buffers Menu Length...
  960.      Prompts you for the number of buffers to display. Then it will
  961.      display that number of most recently selected buffers.
  962.  
  963. Buffers Sub-Menus
  964.      After selection of this item the Buffers menu will contain several
  965.      commands, as submenus of each buffer line. If this item is
  966.      unselected, then there are no submenus for each buffer line, the
  967.      only command available will be selecting that buffer.
  968.  
  969. Save Options
  970.      Selecting this item will save the current settings of your Options
  971.      menu to your `.emacs' file.
  972.  
  973. 
  974. File: xemacs.info,  Node: Buffers Menu,  Next: Tools Menu,  Prev: Options Menu,  Up: Pull-down Menus
  975.  
  976. The Buffers Menu
  977. ----------------
  978.  
  979.    The Buffers menu provides a selection of up to ten buffers and the
  980. item List All Buffers, which provides a Buffer List. *Note List
  981. Buffers:: for more information.
  982.  
  983. 
  984. File: xemacs.info,  Node: Tools Menu,  Next: Help Menu,  Prev: Buffers Menu,  Up: Pull-down Menus
  985.  
  986. The Tools Menu
  987. --------------
  988.  
  989.    The Tools pull-down menu contains the Grep..., Compile..., Shell
  990. Command..., Shell Command on Region..., Debug(GDB)...  and
  991. Debug(DBX)... menu items, and the Compare, Merge, Apply Patch and Tags
  992. sub-menus.  When you select a menu item, Emacs executes the equivalent
  993. command.  For some of the menu items, there are sub-menus which you
  994. will need to select.
  995.  
  996. 
  997. File: xemacs.info,  Node: Help Menu,  Next: Menu Customization,  Prev: Tools Menu,  Up: Pull-down Menus
  998.  
  999. The Help Menu
  1000. -------------
  1001.  
  1002.    The Help Menu gives you access to Emacs Info and provides a menu
  1003. equivalent for each of the choices you have when using `C-h'.  *Note
  1004. Help:: for more information.
  1005.  
  1006.    The Help menu also gives access to UNIX online manual pages via the
  1007. UNIX Manual Page option.
  1008.  
  1009. 
  1010. File: xemacs.info,  Node: Menu Customization,  Prev: Help Menu,  Up: Pull-down Menus
  1011.  
  1012. Customizing XEmacs Menus
  1013. ------------------------
  1014.  
  1015.    You can customize any of the pull-down menus by adding or removing
  1016. menu items and disabling or enabling existing menu items.
  1017.  
  1018.    The following functions are available:
  1019. `add-menu: (MENU-PATH MENU-NAME MENU-ITEMS &OPTIONAL BEFORE)'
  1020.      Add a menu to the menu bar or one of its submenus.
  1021.  
  1022. `add-menu-item: (MENU-PATH ITEM-NAME FUNCTION ENABLED-P
  1023.      &optional before)' Add a menu item to a menu, creating the menu
  1024.      first if necessary.
  1025.  
  1026. `delete-menu-item: (PATH)'
  1027.      Remove the menu item defined by PATH from the menu hierarchy.
  1028.  
  1029. `disable-menu-item: (PATH)'
  1030.      Disable the specified menu item.
  1031.  
  1032. `enable-menu-item: (PATH)'
  1033.      Enable the specified previously disabled menu item.
  1034.  
  1035. `relabel-menu-item: (PATH NEW-NAME)'
  1036.      Change the string of the menu item specified by PATH to NEW-NAME.
  1037.  
  1038.    Use the function `add-menu' to add a new menu or submenu.  If a menu
  1039. or submenu of the given name exists already, it is changed.
  1040.  
  1041.    MENU-PATH identifies the menu under which the new menu should be
  1042. inserted.  It is a list of strings; for example, `("File")' names the
  1043. top-level File menu.  `("File" "Foo")' names a hypothetical submenu of
  1044. File.  If MENU-PATH is `nil', the menu is added to the menu bar itself.
  1045.  
  1046.    MENU-NAME is the string naming the menu to be added.
  1047.  
  1048.    MENU-ITEMS is a list of menu item descriptions.  Each menu item
  1049. should be a vector of three elements:
  1050.  
  1051.    * A string, which is the name of the menu item
  1052.  
  1053.    * A symbol naming a command, or a form to evaluate
  1054.  
  1055.    * `t' or `nil' to indicate whether the item is selectable
  1056.  
  1057.    The optional argument BEFORE is the name of the menu before which
  1058. the new menu or submenu should be added.  If the menu is already
  1059. present, it is not moved.
  1060.  
  1061.    The function `add-menu-item' adds a menu item to the specified menu,
  1062. creating the menu first if necessary.  If the named item already
  1063. exists, the menu remains unchanged.
  1064.  
  1065.    MENU-PATH identifies the menu into which the new menu item should be
  1066. inserted.  It is a list of strings; for example, `("File")' names the
  1067. top-level File menu.  `("File" "Foo")' names a hypothetical submenu of
  1068. File.
  1069.  
  1070.    ITEM-NAME is the string naming the menu item to add.
  1071.  
  1072.    FUNCTION is the command to invoke when this menu item is selected.
  1073. If it is a symbol, it is invoked with `call-interactively', in the same
  1074. way that functions bound to keys are invoked.  If it is a list, the
  1075. list is simply evaluated.
  1076.  
  1077.    ENABLED-P controls whether the item is selectable or not.  It should
  1078. be `t', `nil', or a form to evaluate to decide.  This form will be
  1079. evaluated just before the menu is displayed, and the menu item will be
  1080. selectable if that form returns non-`nil'.
  1081.  
  1082.    For example, to make the `rename-file' command available from the
  1083. File menu, use the following code:
  1084.  
  1085.      (add-menu-item '("File") "Rename File" 'rename-file t)
  1086.  
  1087.    To add a submenu of file management commands using a File Management
  1088. item, use the following code:
  1089.  
  1090.      (add-menu-item '("File" "File Management") "Copy File" 'copy-file t)
  1091.      (add-menu-item '("File" "File Management") "Delete File" 'delete-file t)
  1092.      (add-menu-item '("File" "File Management") "Rename File" 'rename-file t)
  1093.  
  1094.    The optional BEFORE argument is the name of a menu item before which
  1095. the new item should be added.  If the item is already present, it is
  1096. not moved.
  1097.  
  1098.    To remove a specified menu item from the menu hierarchy, use
  1099. `delete-menu-item'.
  1100.  
  1101.    PATH is a list of strings that identify the position of the menu
  1102. item in the menu hierarchy.  `("File" "Save")' means the menu item
  1103. called Save under the top level File menu.  `("Menu" "Foo" "Item")'
  1104. means the menu item called Item under the Foo submenu of Menu.
  1105.  
  1106.    To disable a menu item, use `disable-menu-item'.  The disabled menu
  1107. item is grayed and can no longer be selected.  To make the item
  1108. selectable again, use `enable-menu-item'.  `disable-menu-item' and
  1109. `enable-menu-item' both have the argument PATH.
  1110.  
  1111.    To change the string of the specified menu item, use
  1112. `relabel-menu-item'. This function also takes the argument PATH.
  1113.  
  1114.    NEW-NAME is the string to which the menu item will be changed.
  1115.  
  1116. 
  1117. File: xemacs.info,  Node: Entering Emacs,  Next: Exiting,  Prev: Pull-down Menus,  Up: Top
  1118.  
  1119. Entering and Exiting Emacs
  1120. **************************
  1121.  
  1122.    The usual way to invoke Emacs is to type `emacs <RET>' at the shell
  1123. (for XEmacs, type `xemacs <RET>').  Emacs clears the screen and then
  1124. displays an initial advisory message and copyright notice.  You can
  1125. begin typing Emacs commands immediately afterward.
  1126.  
  1127.    Some operating systems insist on discarding all type-ahead when Emacs
  1128. starts up; they give Emacs no way to prevent this.  Therefore, it is
  1129. wise to wait until Emacs clears the screen before typing the first
  1130. editing command.
  1131.  
  1132.    Before Emacs reads the first command, you have not had a chance to
  1133. give a command to specify a file to edit.  Since Emacs must always have
  1134. a current buffer for editing, it presents a buffer, by default, a
  1135. buffer named `*scratch*'.  The buffer is in Lisp Interaction mode; you
  1136. can use it to type Lisp expressions and evaluate them, or you can
  1137. ignore that capability and simply doodle.  You can specify a different
  1138. major mode for this buffer by setting the variable `initial-major-mode'
  1139. in your init file.  *Note Init File::.
  1140.  
  1141.    It is possible to give Emacs arguments in the shell command line to
  1142. specify files to visit, Lisp files to load, and functions to call.
  1143.  
  1144.